package com.lagou.mapper;

import com.lagou.pojo.Article;
import org.apache.ibatis.annotations.Select;
import org.springframework.data.repository.query.Param;

import java.util.List;


public interface ArticleMapper {

    //根据id查询对应的文章
    public Article selectArticle(Integer id);

    @Select("select * from t_article limit #{offset},#{limit}")
    public List<Article> list(@Param("offset") int offset, @Param("limit") int limit);
    @Select("select count(id) from t_article")
    Integer count();

}
